//
// Created by hjie on 23-6-22.
//

#pragma once

#include <string>
#include <memory>
#include <uWS/uWS.h>

class ConnectionDataRoom;

class ConnectionData
{
public:
    explicit ConnectionData(ConnectionDataRoom * room);
    ~ConnectionData();
    void ProcessData(const char * msg, int size, int op);
    void ProcessData(std::string * content, int op);
    void Destroy();
    void UpdateTime();
    void HeartBeat();
public:
    std::string m_room_id;
    std::string m_user_name;
public:
    std::shared_ptr<ConnectionDataRoom> m_room;
    uWS::WebSocket<uWS::SERVER> * m_socket;
public:
    int64_t m_heart_time;
};

